@echo off

set pause=true
if /i "%1"=="/q" (
 set pause=false
 SHIFT
)


RMDIR "..\..\Sidvall.DataPortal\bin" /Q /S
@if errorlevel 1 goto :error
RMDIR "..\..\Sidvall.DataPortal\obj" /Q /S
@if errorlevel 1 goto :error

RMDIR "..\..\Sidvall.IO.AzureStorage\bin" /Q /S
@if errorlevel 1 goto :error
RMDIR "..\..\Sidvall.IO.AzureStorage\obj" /Q /S
@if errorlevel 1 goto :error

RMDIR "..\..\Sidvall.IO.Net\bin" /Q /S
@if errorlevel 1 goto :error
RMDIR "..\..\Sidvall.IO.Net\obj" /Q /S
@if errorlevel 1 goto :error

RMDIR "..\..\Sidvall.Logging.Diagnostics\bin" /Q /S
@if errorlevel 1 goto :error
RMDIR "..\..\Sidvall.Logging.Diagnostics\obj" /Q /S
@if errorlevel 1 goto :error

RMDIR "..\..\Sidvall.Net.Mail.SendGrid\bin" /Q /S
@if errorlevel 1 goto :error
RMDIR "..\..\Sidvall.Net.Mail.SendGrid\obj" /Q /S
@if errorlevel 1 goto :error

RMDIR "..\..\Sidvall.Office.IG\bin" /Q /S
@if errorlevel 1 goto :error
RMDIR "..\..\Sidvall.Office.IG\obj" /Q /S
@if errorlevel 1 goto :error

RMDIR "..\..\Sidvall.Plugins.Test\bin" /Q /S
@if errorlevel 1 goto :error
RMDIR "..\..\Sidvall.Plugins.Test\obj" /Q /S
@if errorlevel 1 goto :error

RMDIR "..\..\Sidvall.Reporting.IG\bin" /Q /S
@if errorlevel 1 goto :error
RMDIR "..\..\Sidvall.Reporting.IG\obj" /Q /S
@if errorlevel 1 goto :error

RMDIR "..\..\Sidvall.Reporting.Stimulsoft\bin" /Q /S
@if errorlevel 1 goto :error
RMDIR "..\..\Sidvall.Reporting.Stimulsoft\obj" /Q /S
@if errorlevel 1 goto :error

RMDIR "..\..\Sidvall.UI.Wpf.IG\bin" /Q /S
@if errorlevel 1 goto :error
RMDIR "..\..\Sidvall.UI.Wpf.IG\obj" /Q /S
@if errorlevel 1 goto :error

RMDIR "..\..\Sidvall.UI.Wpf.Test\bin" /Q /S
@if errorlevel 1 goto :error
RMDIR "..\..\Sidvall.UI.Wpf.Test\obj" /Q /S
@if errorlevel 1 goto :error

RMDIR "..\..\Sidvall.Web.IO\bin" /Q /S
@if errorlevel 1 goto :error
RMDIR "..\..\Sidvall.Web.IO\obj" /Q /S
@if errorlevel 1 goto :error

RMDIR "..\..\Sidvall.Web.IO.Host\bin" /Q /S
@if errorlevel 1 goto :error
RMDIR "..\..\Sidvall.Web.IO.Host\obj" /Q /S
@if errorlevel 1 goto :error

RMDIR "..\..\Sidvall.Web.Test\bin" /Q /S
@if errorlevel 1 goto :error
RMDIR "..\..\Sidvall.Web.Test\obj" /Q /S
@if errorlevel 1 goto :error



@goto :exit



:error
if %returnErrorCode%==false goto exit

@ECHO An error occured - %errorLevel%
PAUSE
@exit errorLevel



:exit
if %pause%==true PAUSE
